<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ include file="/commons/taglibs.jsp"%>

<html>

	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
		<meta name="renderer" content="webkit">
		<meta http-equiv="Cache-Control" content="no-siteapp" />

		<title>体检库指标项配置</title>
		<%@ include file="/commons/static.jsp"%>
		<link rel="stylesheet" href="${ctx}/dep/treeTable/css/jquery.treetable.css" />
		<link rel="stylesheet" href="${ctx}/dep/treeTable/css/jquery.treetable.theme.default.css" />
		
		<link href="${ctx}/dep/moban/css/beyond.min.css" rel="stylesheet" />
		
		<style>
	        .table>thead>tr th.colth{
	            padding: 0;
	        }
	        .table>thead>tr th.colth div{
	            line-height: 26px;
	        }
	        .topline{
	            border-top: 1px solid #ddd;
	        }
	        .rightline{
	            border-right: 1px solid #ddd;
	        }
    	</style>

	</head>

	<body>
	
			<div class="wrapper">
				<div class="page-container">
					<!-- 面包屑导航 -->
					<div class="page-breadcrumbs">
						<ul class="breadcrumb">
							<li><i class="fa fa-home"></i> <a href="#">首页</a></li>
							<li>
								<i class=""></i>
								<a href="#">业务配置管理</a>
							</li>
							<li class="active">
								体检库指标项配置
							</li>
						</ul>
					</div>
					<!-- /面包屑导航-->
					<div class="page-body">
						<div class="row">
							<div class="col-xs-12 col-md-12">
								<div class="widget">
									<div class="widget-body">
										<div class="table-toolbar">
											<div style="display: inline-block;margin-left: 10px;">
												<label class="control-label">体检库：</label>
												<input id="medicalId" style="display: none;" value="${medicalId}"/>
												<select class="form-control" style="width: 200px;display: inline-block;vertical-align: middle;" id="medical">
													<option value="0">请选择</option>
												</select>
											</div>

											<div style="display: inline-block;margin-left: 10px">
												<label class="control-label">项目名称：</label>
												<input id="subjectsId" style="display: none;" value="${subjectsId}"/>
												<select class="form-control" style="width: 200px;display: inline-block;vertical-align: middle;" id="subjects">
													<option value="0">请选择</option>
												</select>
											</div>

											<div style="display: inline-block;margin-left: 10px;">
												<a class="btn btn-blue" href="javascript:searchByParam()"><i class="glyphicon glyphicon-search"></i>搜索</a>
											</div>
											
											<a href="${ctx}/subjects/toAddSubjects" class="btn btn-blue "  >
                                            	<i class="fa fa-plus"></i>新增体检项
                                        	</a>
											
											<a href="${ctx}/medicalContent/toAddMedicalContent" class="btn btn-blue">
												<i class="fa fa-plus"></i>新增体检指标
											</a>
										</div>
										<table class="table table-striped table-hover table-bordered" id="bodyHtml">
											<thead>
											<tr>
												<th width="20%">
													项目名称 <span class="fa indicator fa-unsorted"></span>
												</th>
												<!-- <th>
													体检库 <span class="fa indicator fa-unsorted"></span>
												</th> -->
												<th>
													适宜年龄 <span class="fa indicator fa-unsorted"></span>
												</th>
												<th width="20%" colspan="2" class="colth">
			                                        <div>参考范围</div>
			                                        <div class="topline">
			                                            <span class="col-lg-6 rightline">男</span>
			                                            <span class="col-lg-6">女</span>
			                                        </div>
			                                    </th>
												<!-- <th>
													男性参考范围 <span class="fa indicator fa-unsorted"></span>
												</th>
												<th>
													女性参考范围 <span class="fa indicator fa-unsorted"></span>
												</th> -->
												<th>
													数据单位 <span class="fa indicator fa-unsorted"></span>
												</th>
												<th>
													是否重要 <span class="fa indicator fa-unsorted"></span>
												</th>
												<th>
													是否对比 <span class="fa indicator fa-unsorted"></span>
												</th>
												<th>
													描述 <span class="fa indicator fa-unsorted"></span>
												</th>
												<th width="10%">
													操作 <span class="fa indicator fa-unsorted"></span>
												</th>
											</tr>
											</thead>

											<tbody>
												
												<c:forEach items="${data}" var="subject">
												
													<tr data-tt-id="${subject.id}">
														<td style="text-align: left;">${subject.name}</td>
														<%-- <td>${subject.medical.name}</td> --%>
														<td></td>
														<td></td>
														<td></td>
														<td></td>
														<td>
														<td></td>
														<td></td>
														<td>
															<a href="${ctx}/subjects/toAddSubjects?from=edit&id=${subject.id}" class="btn btn-info btn-xs "><i class="fa fa-edit"></i> 修改</a>
															<%-- <a href="javascript:deleteSubject(${subject.id})" class="btn btn-danger btn-xs "><i class="fa fa-trash-o"></i> 删除</a> --%>
														</td>
													</tr>
													
													<c:forEach items="${subject.medicalContents}" var="content" varStatus="status">
														<tr data-tt-id="${subject.id}-${content.id}" data-tt-parent-id="${subject.id}">
															<td>${content.name}</td>
															<!-- <td></td> -->
															<td>${content.useAgeMin}~${content.useAgeMax}</td>
															<td>${content.scopeManMin}~${content.scopeManMax}</td>
															<td>${content.scopeWomenMin}~${content.scopeWomenMax}</td>
															<td>${content.unit}</td>
															<td>${content.isImportant==1?"是":"否"}</td>
															<td>${content.isCompare==1?"是":"否"}</td>
															<td>${content.descrpiton}</td>
															<td>
																<a href="${ctx}/medicalContent/toAddMedicalContent?from=edit&id=${content.id}" class="btn btn-info btn-xs ">
																	<i class="fa fa-edit"></i> 修改</a>
																<%-- <a href="javascript:deleteContent(${content.id})" class="btn btn-danger btn-xs "><i class="fa fa-trash-o"></i> 删除</a> --%>
															</td>
														</tr>
													</c:forEach>
													
												</c:forEach>
											
											</tbody>
										</table>
									</div>
								</div>
							</div>
						</div>
					</div>
					<P class="bottomfont">© 2016 Angel Health Management Ltd. : 天使健康管理有限公司</P>
				</div>
			</div>
			<!-- /右侧内容 -->

		
		<script src="${ctx}/dep/treeTable/jquery.treetable.js"></script>
		
		<script src="${ctx}/home/institutions/medical_content.js"></script>

	</body>

</html>